#pragma once

#include <type_traits>

#include "utils/filesystem/filesystem.h"

namespace txdnn {

namespace operators {

/*
 * KernelInfo contains information required to build and run a kernel or a graph of kernels.
 * which is expected to perform computations as per problem config.
 * 
 */
struct KernelInfo {
  std::string compile_options;
  std::string kernel_name;
  fs::path kernel_path;
  std::vector<std::size_t> l_wk;
  std::vector<std::size_t> g_wk;

  friend std::ostream& operator<<(std::ostream& os, const KernelInfo& k) {
    os << k.kernel_path << ", " << k.kernel_name << " g_wk={ ";
    for (const auto& size : k.g_wk) {
      os << size << ' ';
    }
    os << "}, l_wk={ ";
    for (const auto& size : k.l_wk) {
      os << size << ' ';
    }
    os << "} '" << k.compile_options << '\'';
    return os;
  }
  
};



} // namespace operators
} // namespace txdnn